﻿var curAudioClip = null;
var AUDIO_CLIP_URL = "mms://211.89.225.101/live1";
var ArrayURL = new Array(4);
ArrayURL[0] = "mms://61.136.19.228/live5";		//交通频道
ArrayURL[1] = "mms://live.cri.cn/oldies";		//怀旧JQ
ArrayURL[2] = "mms://mms.cnr.cn/live2";			//经济之声
ArrayURL[3] = "mms://mms.cnr.cn/live4";			//都市之声
function play_onclick() 
{
		stop.visible = true;
		play.visible = false;
		
	if(curAudioClip == null)
	{
		AUDIO_CLIP_URL = "mms://211.89.225.101/live1";	
		curAudioClip = framework.audio.play(AUDIO_CLIP_URL);
	}	
}

function stop_onclick() 
{
	play.visible = true;
	stop.visible = false;
	curAudioClip.stop();
	curAudioClip = null;
}

function next_onclick() {
	
	if(curAudioClip != null)
	{
		curAudioClip.stop();
		curAudioClip = null;
		play.visible = true;
		stop.visible =false;
	}
	if(curAudioClip == null)
	{	
		AUDIO_CLIP_URL = "mms://live.cri.cn/oldies";	//怀旧JQ
		curAudioClip = framework.audio.play(AUDIO_CLIP_URL);
		play.visible = false;
		stop.visible = true;
	}
}

function high_onclick() {
	if(curAudioClip != null)
	{
		curAudioClip.stop();
		curAudioClip = null;
		play.visible = true;
		stop.visible =false;
	}
	if(curAudioClip == null)
	{

		AUDIO_CLIP_URL = "mms://mms.cnr.cn/live4";			//都市之声
		curAudioClip = framework.audio.play(AUDIO_CLIP_URL);
		play.visible = false;
		stop.visible = true;
	}
}

function low_onclick() {
	if(curAudioClip != null)
	{
		curAudioClip.stop();
		curAudioClip = null;
		play.visible = true;
		stop.visible =false;
	}
	if(curAudioClip == null)
	{

		AUDIO_CLIP_URL = "mms://mms.cnr.cn/live2";	//经济之声
		curAudioClip = framework.audio.play(AUDIO_CLIP_URL);
		play.visible = false;
		stop.visible = true;
	}
}

function pre_onclick() {

	if(curAudioClip != null)
	{
		curAudioClip.stop();
		curAudioClip = null;
		play.visible = true;
		stop.visible =false;
	}
	if(curAudioClip == null)
	{

		AUDIO_CLIP_URL = "mms://61.136.19.228/live5";	//交通频道
		curAudioClip = framework.audio.play(AUDIO_CLIP_URL);
		play.visible = false;
		stop.visible = true;
	}
}

function menu_onclick() {
	var link=new ActiveXObject("WScript.shell")
	link.Run("http://tenxwebradio.appspot.com/")
}

